import request from '@/utils/request.js'
const PATH = '/common'

// 上传文件
export const uploadFile = (data) => {
  return request.post(PATH + '/upload', data)
}

// 随机网易云歌曲（素颜api）
export const getMusic = () => request.get(PATH + '/getMusic')

// 获取随机短句（素颜api）
export const getShortSentence = () => request.get(PATH + '/getShortSentence')

// 获取天气（高德api）
export const getWeather = ({ areaName, cityName }) =>
  request.get(PATH + '/getWeather', { params: { areaName, cityName } })

// 统计数据
export const getStatistics = () => request.get(PATH + '/getStatistics')
